<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        #app {
            padding: 10px;
        }

        .searchbox {
            width: 100%;
            display: flex;
            align-items: center;
            margin: 10px 0;
        }

        input {
            width: 100%;
            height: 40px;
            outline: none;
            border: none;
            border-radius: 50px;
            padding-left: 20px;
            background-color: rgb(230, 231, 235);
        }

        .sousuo {
            width: 60px;
            text-align: center;
            color: aqua;
        }

        .title {
            font-weight: bold;
            padding: 10px 0;
        }

        .list span {
            display: inline-block;
            background-color: #c6bdbd;
            border-radius: 5px;
            padding: 5px;
            margin-right: 10px;
            margin-bottom: 10px;
        }
    </style>
</head>

<body>

    <div id="app">
        <div class="searchbox">
            <input type="text" v-model="searchText">
            <span @click='baocun' class="sousuo">搜索</span>
        </div>
        <div class="block">
            <div class="title">历史搜索</div>
            <div class="list">
                <span v-for="(item,indax) in searchArr" class="lishi">{{item}}</span>
            </div>
        </div>
    </div>

    <script src="1.vue-2.5.21.js"></script>
    <script src="1.index-输入框的绑定.js"></script>

</body>

</html>